package dome4;

public class Text {
    public static void main(String[] args) {
        Shape[] shapes = {new Cycle(), new Flower(), new Flower(), new Cycle()};
        for (Shape shape : shapes) {
            shape.draw();
        }
    }
    public static void main1(String[] args) {
        Cycle cycle = new Cycle();
        Flower flower = new Flower();
        String[] shapes = {"cycle","flower","flower","cycle"};
        for(String shape : shapes) {
            if(shape.equals("cycle")) {
                cycle.draw();
            }else if(shape.equals("flower")) {
                flower.draw();
            }
        }
    }
}
